home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
turbovis
/
tvutil01.zip
/
ALEXLEVI.EXE
/
ALEXLEVI
/
DOC
/
README.DOC
< prev
next >
Wrap
Text File
|
1994-04-03
|
6KB
|
151 lines
Operating instructions
1. Programmer's notes
A. All the modules except MyGadget has a simple general interface: each module
includes three procedures - OpenXXX, WhereXXX and RegisterXXX, where XXX is:
- ProgrammerCalculator for a Programmer Calculator
- PrintManager for a Print Manager
- Notebook for a Notebook
- MouseEditor for a Mouse Graphic Cursor Editor
- VGAFontEditor for a VGA Font Editor
- EpsonFontEditor for a Epson Font Editor
- KeyboardMapEditor for a Keyboard Map Editor
The procedure OpenXXX opens a suitable window on the DeskTop (if there isn't
yet such a window, the procdure creates it. Otherwise it pops and activates
it). OpenNotebook procedure has single parameter - notebook file name (PathStr,
but may be used any string type). Other OpenXXX procedures hasn't parameters.
The function WhereXXX returns a pointer to a suitable window if it exists,
otherwise - NIL.
The procedure RegisterXXX register the window to use in a stream (if your
program does not use resources and operations like Save DeskTop, then there is
usually no need to use this procedure).
Note: all these objects use colors from CCyanDialog in a non-standard way.
If you wish to use TColorDialog, then you should rewrite the GetPalette method
of these objects.
Let's look at an example - a VGA Font Editor program:
Program VGA_Font_Editor;
Uses Views, { Required Constants }
MsgBox, { MessageBox procedure }
App, { Main program }
EdVGAfnt; { VGA Font Editor }
var
A: TApplication; { Main program variable }
begin
{ Initialize main program }
A.Init;
{ Create a VGA Font Editor and insert it into the desktop }
OpenVGAFontEditor;
{ if Font Editor was created ... }
if WhereVGAFontEditor <> NIL then
begin
{ Disable closing window with a mouse or Alt-F3 }
WhereVGAFontEditor^.Flags := WhereVGAFontEditor^.Flags and not wfClose;
{ Recreate VGA Font Editor's window frame without a close button }
WhereVGAFontEditor^.Frame^.DrawView;
{ Pre Operation Message }
MessageBox(^M^C'VGA Font Editor'^M^C'(C) 1993 by Alex Levitas',
NIL, mfInformation + mfOKbutton);
{ Run main program - actually, only the Font Editor }
A.Run;
end;
{ End Main program }
A.Done;
end.
B. The Print Manager module has also several modules that enables defining the
nature of its behavior at run time. Here they are:
- A group of PString pointers that points to strings including printer commands
Double_Strike { Start double-strike mode }
No_Double_Strike { End double-strike mode }
Small { Start compressed double-strike mode }
No_Small { End compressed double-strike mode }
_Underlined { Start underlined mode }
No_Underlined { End underlined mode }
_Emphasized { Start emphasized mode }
No_Emphasized { End emphasized mode }
PageOut { Page Out (Form Feed) }
The default of these pointers are commands in the ESC/P standard, which is
suitable to EPSON of IBM-PROPRINTER compatible dot-matrix printers. If you
want to use a different kind of a printer, it is simply required to pass
these pointers addresses of strings containing the necessary printer commands.
- Variable WordValidChars.
WordValidChars: Set of char = ['0'..'9','A'..'Z','a'..'z','_'];
This variable defines which characters can compose a single word. For
example, to treat also hebrew words, you should do this:
WordValidChars := WordValidChars + ['Ç'..'Ü'];
- Variables AnyChar and AnyChars
AnyChar: Char = '?';
AnyChars: Char = '*';
These variables define which character will be the wildcards to define a single
character or none (AnyChar variable), and to define a characters combination
(AnyChars variable). For example, in a VAX/VMS, the '?' is replaced by the
character '%'. To replace '?' with '%' do:
AnyChar := '%';
- Variable CharRequired
CharRequired: Boolean = FALSE;
This variable defines if the character '?' (or a replacing character defined
by AnyChar) actually requires any character, or it can equal also to nothing.
True means that a character must be available.
C. The MyGadget module contains several procedures and a Free Memory Viewer
object.
The procedures are:
GoToLineNumber - jump current editor to the given line
SetKbdSpeed - defines keyboard speed (in AT class an above computers)
ExecuteDosCommand - execute a DOS command
CloseAll - close all DeskTop windows
SaveAll - save all text editor windows
All these procedures are without parameters. The first three open a dialog
box to input required parameters.
The objects of the Free Memory Viewer (names THeapView) has a similar
interface to THeapView of the GADGETS module in EXAMPLES\TVDEMO in
TURBO PASCAL 7.0. An example for this interface can be seen in the
TVDEMO program from the same source. The only difference is that this new
object show thae amount of free memory in percents instead of bytes.
2. Manual for the end-user
Modules have acompanying text files that contain user guides. A file with an
.SRC extension is written in a source format for the Turbo Vision Help Compiler
version 1.1, and is intended to create context help for users in Turbo Vision
programs. If you use context help in your program, then to use this file, you
only have to enter this DOS command:
COPY /B YOURHELP.EXT + MYHELP.SRC ALL_HELP.TXT
where YOURHELP.TXT is the name of your help file, and ALL_HELP.TXT is the name
of the final help file. You must recompile the help file with TVHC (Turbo
Vision Help Compiler). A file with a .TXT extension is a normal text file ,that
can be added to the user guide.